package com.ruoyi.system.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysCustomer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 经销商档案对象 sys_customer
 *
 * @author anan
 * @date 2021-03-02
 */
@Data
@TableName("sys_customer")
public class CustomerVo
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId
    private Long id;

    /** 编号 */
    private String code;

    /** 经销商 */
    private String name;

    /** 上级经销商 */
    private Long cCustomerupId;

    /** 经销商级别 */
    private Long cCusrankId;

    /** 区域经理 */
    private Long areamngId;

    /** 城市 */
    private Long cCityId;

    /** 联系人 */
    private String contacter;

    /** 手机 */
    private String mobile;

    /** 地址 */
    private String address;

    /** 是否参与O2O */
    private String isO2o;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date creationdate;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date modifieddate;

    /** 可用 */
    private String isactive;

    /** 是否上线 */
    private String isOnline;

    /** 经销商权限类型 */
	@TableField(exist = false)
    private String customerType;

    /** 选中店仓数量 */
    @TableField(exist = false)
    private Integer storeCount;

    /** 子部门 */
    @TableField(exist = false)
    private List<CustomerVo> children = new ArrayList<CustomerVo>();

	/** 备注 */
	@Excel(name = "备注")
	private String remark;

//	public CustomerVo(SysCustomer customer) {
//		this.id = customer.getId();
//		this.code = customer.getCode();
//		this.name = customer.getName();
//		this.cCustomerupId = customer.getcCustomerupId();
//		this.cCusrankId = customer.getcCusrankId();
//		this.areamngId = customer.getAreamngId();
//		this.cCityId = customer.getcCityId();
//		this.contacter = customer.getContacter();
//		this.mobile = customer.getMobile();
//		this.address = customer.getAddress();
//		this.isO2o = customer.getIsO2o();
//		this.creationdate = customer.getCreationdate();
//		this.modifieddate = customer.getModifieddate();
//		this.isactive = customer.getIsactive();
//		this.isOnline = customer.getIsOnline();
//		this.remark = customer.getRemark();
//	}
}
